#include "runpage.h"
#include "ui_runpage.h"
#include "mainWidget.h"

RunPage::RunPage(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::RunPage)
{
    ui->setupUi(this);

    pWidget = static_cast<Widget*>(parent);

    connect(ui->Btn_stop, &QPushButton::clicked, this, [=](){
        pWidget->Stop();
    });
    connect(ui->Btn_pause, &QPushButton::clicked, this, [=](){
        pWidget->Stop();
    });
    connect(ui->Btn_start, &QPushButton::clicked, this, [=](){
        pWidget->Auto();
    });
    connect(ui->Btn_oneCycle, &QPushButton::clicked, this, [=](){
        pWidget->Auto();
    });
}

RunPage::~RunPage()
{
    delete ui;
}
